package me.jamc.skeleton.configuration;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import me.jamc.skeleton.interceptor.ExecutionInterceptor;

/**
 * Created by Jamc on 10/26/16.
 */
@Configuration
public class EndpointConfiguration extends WebMvcConfigurerAdapter {

    @Autowired
    private ExecutionInterceptor execInt;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(execInt).addPathPatterns("/");
    }

}
